﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PServiceBus.MessageProxy {
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
    public class ESBEndListenerAttribute: Attribute {
        public string ID { get; internal set; }

        public string Topic { get; set; }

        public ESBEndListenerAttribute(string topic, string id) {
            ID = id;
            Topic = topic;
        }

        public ESBEndListenerAttribute(Type topicType, string id)
            : this(topicType.Name, id) { }

        public ESBEndListenerAttribute(Type topicType) : this(topicType, topicType.Name) { }
    }
}
